home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / bench / x.txt / 000302_fdc@columbia.edu_Mon Jan 21 15:46:09 EST 2002.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  68 lines

  1. Article: 13137 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: Using redirection when starting K95
  6. Date: 21 Jan 2002 15:46:00 -0500
  7. Organization: Columbia University
  8. Lines: 51
  9. Message-ID: <a2hum8$o2f$1@watsol.cc.columbia.edu>
  10. References: <3d44a7c4.0201211200.7a8591b0@posting.google.com>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1011645961 26329 128.59.39.139 (21 Jan 2002 20:46:01 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 21 Jan 2002 20:46:01 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13137
  16.  
  17. In article <3d44a7c4.0201211200.7a8591b0@posting.google.com>,
  18. Larry Mann <lvm@cowlitz.com> wrote:
  19. : (I attempted to post a similar message earlier today it did appear to
  20. : get listed so I am trying again)
  21. :
  22. It did appear and I did answer it, but so as not to appear unresponsive,
  23. will answer it again, especially as this posting is not the same as your
  24. first one.
  25.  
  26. : Some years ago I wrote several Unix shell scripts that called Kermit
  27. : using redirection...
  28. :
  29. As noted in the C-Kermit book, this is not how to write scripts.  It
  30. prevents all sorts of things from working, like GOTO, certain kinds of
  31. loops, etc.
  32.  
  33. : ... for both providing input from a Kermit script and
  34. : any response output to a file.  This was done with HP-UX and C-Kermit
  35. : communicating with a remote Kermit server.
  36. : I now need to move these scripts from HP-UX and C-Kermit to Windows
  37. : 2000 Server and K95. I have installed a Unix shell on W2K and all is
  38. : fine except the shell script lines that call Kermit, K95, do not seem
  39. : to accept redirection, for example:
  40. :    k95 < in.ksc > out.txt
  41. :
  42. Because Kermit 95 is not a Unix program and does not read from stdin.
  43. If it did, it wouldn't be able to see the full keyboard, which is a must
  44. for any PC-based terminal program.
  45.  
  46. : where in.ksc contains and is communicating with a remote Kermit
  47. : server:
  48. :    set line com1
  49. :    set baud 9600
  50. :    rem dir c:/temp
  51. : This would capture a list of filenames from the remote server into
  52. : out.txt for further processing in the shell script.
  53. : I understand that I could provide the script name as the first item on
  54. : the Kermit command line, such as:  k95 in.ksc   and that's fine...
  55. : but how can I capture the standard output from this script to a file,
  56. : out.txt?
  57. Again:
  58.  
  59.   rem dir c:/temp > filename
  60.  
  61. You could have done this in C-Kermit too.
  62.  
  63. - Frank
  64.